package org.jeecgframework.web.service;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.jeecgframework.core.common.model.json.AjaxJson;
import org.jeecgframework.core.common.service.CommonService;
import org.jeecgframework.web.system.pojo.base.CbsAppMessageEntity;

public interface CbsAppMessageServiceI extends CommonService{
	
 	public <T> void delete(T entity);
 	
 	public <T> Serializable save(T entity);
 	
 	public <T> void saveOrUpdate(T entity);
 	
 	/**
	 * 默认按钮-sql增强-新增操作
	 * @param id
	 * @return
	 */
 	public boolean doAddSql(CbsAppMessageEntity t);
 	/**
	 * 默认按钮-sql增强-更新操作
	 * @param id
	 * @return
	 */
 	public boolean doUpdateSql(CbsAppMessageEntity t);
 	/**
	 * 默认按钮-sql增强-删除操作
	 * @param id
	 * @return
	 */
 	public boolean doDelSql(CbsAppMessageEntity t);
 	
 	/**
 	 * @author xiul
 	 * 2016-10-28 下午3:04:56
 	 * Description 查询未读消息数量 
 	 */
 	public Integer queryAppMessageUnreadCount(HttpServletRequest req);
 	
 	/**@author xiul
	 * 2016-8-24 上午10:57:07
	 * Description APP - 查询APP消息
	 */
 	public List<Map<String, Object>> queryAppMessage(HttpServletRequest req);
 	
 	/**@author xiul
	 * 2016-10-26 下午8:07:45
	 * Description APP - 读消息
	 */
	void readAppMessage(AjaxJson j, HttpServletRequest req);

	/**@author xiul
	 * 2016-11-10 下午5:02:19
	 * Description  APP 批量 把消息设为已读 
	 */
	public void appBatchReadMessage(AjaxJson j, HttpServletRequest req);
}
